package com.paddyi.controller;

import com.paddyi.model.PaddyOrder;
import com.paddyi.service.IPaddyOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.paddyi.commons.http.HttpResult;

/**
 *  (Order)
 * @author paddy
 * @since  2019-08-09 12:00:53
 */
@RestController
@RequestMapping("order")
public class OrderController {

	@Autowired
	private IPaddyOrderService orderService;

	/**
	 * 保存
	 * @param record
	 * @return
	 */	
	@PostMapping(value="/makePayOrder")
	public HttpResult makePayOrder(String number) {
        PaddyOrder order = new PaddyOrder();
		order.setNumber(number);
		return HttpResult.ok(orderService.makePayOrder(order));
	}

	@PostMapping(value="/transactionTest")
	public HttpResult transactionTest() {

		return HttpResult.ok(orderService.transactionTest());
	}


}
